package com.sos.widget.binding;

import android.widget.LinearLayout;

import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.databinding.BindingAdapter;

/**
 * @Description
 * @Author 梁浩文
 * @Date 2022/8/26 10:05
 */
public class LinearLayoutBinding {

    @BindingAdapter(value = {"saas_gravity", "saas_orientation"}, requireAll = false)
    public static void LinearBinding(LinearLayout view, Integer gravity, @LinearLayoutCompat.OrientationMode Integer orientation) {
        if (view != null) {
            if (gravity != null) {
                view.setGravity(gravity);
            }
            if (orientation != null) {
                view.setOrientation(orientation);
            }
        }
    }
}
